import { RouterProvider, createHashRouter, Navigate } from 'react-router-dom';
import Login from '@/pages/Login/index.jsx';
import Home from '@/pages/Home/index.jsx';
import Business from '@/pages/Business/index.jsx';
import Test from '@/pages/Business/SubViews/Test.jsx';
import Test1 from '@/pages/Business/SubViews/Test1.jsx';

const router = createHashRouter([
    {
        path: "/",
        element: <Navigate to="/login" />
    },
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/home",
        element: <Home />
    },
    {
        path: "/app/*",
        element: <Business />,
        children: [
            {
                path: "test",
                element: <Test />
            },
            {
                path: "test1",
                element: <Test1 />
            }
        ]
    }
])
const MainRoutes = () => {
    return (
        <RouterProvider router={router} />
    )
}
export default MainRoutes;
